{% extends "base.html" %}
{% load djblets_deco %}
{% load i18n %}
{% load reviewtags %}

{% block title %}{% trans "Screenshot" %}{%if screenshot.caption %}: {{screenshot.caption}}{% endif %}{% endblock %}

{% block jsconsts %}
{%  include "reviews/review_flags.js" %}
  var gScreenshotId = '{{screenshot.id}}';
{% endblock %}

{% block css %}
<link rel="stylesheet" type="text/css" href="{{MEDIA_URL}}rb/css/diffviewer.css?{{MEDIA_SERIAL}}" />
<link rel="stylesheet" type="text/css" href="{{MEDIA_URL}}rb/css/reviews.css?{{MEDIA_SERIAL}}" />
{% endblock %}

{% block scripts %}
<script type="text/javascript" src="{{MEDIA_URL}}djblets/js/jquery-1.3.2.min.js"></script>
{% endblock %}

{% block scripts-post %}
<script type="text/javascript" src="{{MEDIA_URL}}djblets/js/jquery-ui-1.6rc5.min.js"></script>
<script type="text/javascript" src="{{MEDIA_URL}}djblets/js/jquery.gravy.js?{{MEDIA_SERIAL}}"></script>
<script type="text/javascript" src="{{MEDIA_URL}}rb/js/ui.autocomplete.min.js?{{MEDIA_SERIAL}}"></script>
<script language="javascript" src="{{MEDIA_URL}}rb/js/common.js?{{MEDIA_SERIAL}}"></script>
<script language="javascript" src="{{MEDIA_URL}}rb/js/reviews.js?{{MEDIA_SERIAL}}"></script>
<script language="javascript" src="{{MEDIA_URL}}rb/js/screenshots.js?{{MEDIA_SERIAL}}"></script>
<script type="text/javascript" src="{{MEDIA_URL}}rb/js/jquery.form.js?{{MEDIA_SERIAL}}"></script>
{% endblock %}

{% block content %}
{% box "review-request"%}
 <ul id="actions">
{% include "reviews/review_request_actions_secondary.html" %}
 <li class="primary"><a href="diff/raw/">{% trans "Download Diff" %}</a></li>
{% include "reviews/review_request_actions_primary.html" %}
  <li class="primary"><a href="{{review_request.get_absolute_url}}">{% trans "View Reviews" %}</a></li>
{% if review_request_details.diffset or review_request.diffset_history.diffsets.count %}
 <li class="primary"><a href="{{review_request.get_absolute_url}}diff/#index_header">{% trans "View Diff" %}</a></li>
{% endif %}
 </ul>

{% include "reviews/review_request_dlgs.html" %}

 <div class="main">
  <h1 id="summary"><a href="{{review_request.get_absolute_url}}">{{review_request_details.summary}}</a></h1>
  <div class="content">
  {% trans "Screenshots:" %}<br />
{% include "reviews/screenshotindex.html" %}
  </div>
 </div>
{% endbox %}

<div id="screenshot-display">
 <img src="{{screenshot.image.url}}" alt="{{screenshot.caption}}" />
</div>

{% include "reviews/comments_dlg.html" %}

<script language="javascript">
  $(document).ready(function() {
	  $("#screenshot-display").screenshotCommentBox(
		{% screenshotcommentcounts screenshot %});
	});
</script>

{% include "reviews/screenshotindex.html" %}

{% endblock %}
